package pattern.composit;

public class MenuItem extends MenuComponent
{
	String name;
	String description;
	boolean vegetarian;
	double price;
	public MenuItem(String name, String description, boolean vegetarian, double price)
	{
		this.name = name;
		this.description = description;
		this.vegetarian = vegetarian;
		this.price = price;
	}
	@Override
	public String getName()
	{
		return name;
	}
	@Override
	public String getDiscription() throws Exception 
	{
		return description;
	}
	@Override
	public double getPrice()
	{
		return price;
	}
	@Override
	public boolean isVegetarian()
	{
		return vegetarian;
	}
	@Override
	public void print() throws Exception
	{
		System.out.println(name+description+price+vegetarian);
	}
}
